SET QUOTED_IDENTIFIER ON
GO
SET ANSI_NULLS ON
GO
CREATE VIEW dbo.vw_Jubilados
AS
SELECT     ok.*, l.localidad AS Expr1, pp.Organizacion AS Expr2, pp.CUISE AS Expr3
FROM         dbo.JubiladosOK ok INNER JOIN
                      dbo.tb_Agentes a ON ok.documento = a.Documento INNER JOIN
                      dbo.tb_Localidades l ON a.Localidad = l.idLocalidad INNER JOIN
                      dbo.vw_POFPaquetes pp ON pp.Documento = ok.documento
WHERE     (ok.edad > 53)
GO
